
function openwin(partment)
{
  if(partment==null || partment=="")
     return;
  if(partment=="qingSR")
  {
     currentlyObj=QSR;
  }else if(partment=="qingSBM")
  {
     currentlyObj=QSBM;
  }else if(partment=="qingSDX")
  {
    currentlyObj=QSDX;
  }

  if(currentlyObj!=null)
  {
     showModalDialog("/PubUI/PUI_OrgSelect.jsp",window,'dialogHeight:212px;dialogWidth:550px;status=off');
     writeObj(partment);
     currentlyObj=null;
  }
}


function writeObj(partment)
{
   var outstr="";
  if(currentlyObj!=null)
  {
     for(var i=0;i<currentlyObj.getOrgCount();i++)
     {
       var tmporg=currentlyObj.fndbyIndex(i);
       if(tmporg!=null){
        if(outstr=="")
          outstr=tmporg.getOrgName();
        else
         outstr=outstr+","+tmporg.getOrgName();
       }
     }
  }

  if(partment=="qingSDX")
  {
    qingShiDuiXiang.innerHTML = outstr;
  }else if(partment=="qingSR")
  {
     qingShiRen.innerHTML = outstr;
  }else if(partment=="qingSBM")
  {
	 qingShiBuMen.innerHTML = outstr;
  }
}
